﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    x:Class="RoofusUIControls.SurfaceItem"
    Height="Auto" Width="Auto" Loaded="ControlNowLoaded" MinWidth="40" MinHeight="40" SizeChanged="SizeChangedFired">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="MainDrawingElements.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>
	<StackPanel Width="Auto" Height="Auto" Orientation="Horizontal">
		<Grid x:Name="ItemGrid" Focusable="False" IsItemsHost="False" Width="Auto" Height="Auto" >
			<Grid.RowDefinitions>
				<RowDefinition Height="10" MaxHeight="10" MinHeight="10" />
				<RowDefinition Height="*" />
				<RowDefinition Height="10" MaxHeight="10" MinHeight="10" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="10" MaxWidth="10" MinWidth="10" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="10" MaxWidth="10" MinWidth="10" />
			</Grid.ColumnDefinitions>
			<Rectangle Grid.Column="2" Grid.Row="1" x:Name="rectOutputPins" Stroke="Black" Fill="CadetBlue" Height="10" VerticalAlignment="Center" HorizontalAlignment="Left" Width="10" />
			<Rectangle Grid.Column="0" Grid.Row="1" x:Name="rectInputPins" Stroke="Black" Fill="CadetBlue" Height="10" VerticalAlignment="Center" MouseDown="rectInputPins_MouseDown" />
		</Grid>
		<Rectangle Width="20" Height="24.145"/>
		<Grid Width="Auto" Height="Auto">
			<Rectangle Fill="#FF202020" Stroke="Black" RadiusX="9.5" RadiusY="9.5" x:Name="ControlStem" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="60"/>
			<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top">
				<Button x:Name="RemoveSurfaceItem" Style="{DynamicResource Button10x10CurvedTop}" Width="15" Height="15" Background="{x:Null}" Click="RemoveSurfaceItem_Click" />
				<Button x:Name="ActivateSettings" Style="{DynamicResource ButtonSettings}" Width="15" Height="15" Content="Button" Click="ActivateSettings_Click"/>
				<Canvas Width="15" Height="30" Cursor="SizeAll">
					<Rectangle x:Name="DragHandle" Stroke="Black" Fill="#FF000000" RenderTransformOrigin="0.5,0.5" Width="15" Height="30" >
						<Rectangle.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="1" ScaleY="1"/>
								<SkewTransform AngleX="-0.179" AngleY="0"/>
								<RotateTransform Angle="0"/>
								<TranslateTransform X="-0.024" Y="0"/>
							</TransformGroup>
						</Rectangle.RenderTransform>
					</Rectangle>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="0.697" Canvas.Top="4.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="5.718" Canvas.Top="4.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="10.672" Canvas.Top="4.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="0.697" Canvas.Top="10" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="5.718" Canvas.Top="10" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="10.672" Canvas.Top="10" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="0.697" Canvas.Top="15.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="5.718" Canvas.Top="15.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="10.672" Canvas.Top="15.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="0.697" Canvas.Top="20.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="5.718" Canvas.Top="20.5" IsEnabled="False"/>
					<Rectangle Fill="#FF5F5E5E" Stroke="#FFE7E5E5" Width="3.639" Height="3.616" Canvas.Left="10.672" Canvas.Top="20.5" IsEnabled="False"/>
				</Canvas>
			</StackPanel>
		</Grid>
	</StackPanel>
</UserControl>
